JP 2012-43890 A discloses a semiconductor device in which an IGBT region and a diode region are formed on one semiconductor substrate. The semiconductor device has a front surface electrode provided on a front surface of the semiconductor substrate and a back surface electrode provided on a back surface of the semiconductor substrate. The IGBT region includes: a collector layer of a first conductivity type, the collector layer being in contact with the back surface electrode; an IGBT drift layer of a second conductivity type, the IGBT drift layer being provided on a front surface side of the semiconductor substrate with respect to the collector layer; a body layer of the first conductivity type, the body layer being provided on the front surface side of the semiconductor substrate with respect to the IGBT drift layer, the body layer being in contact with the front surface electrode; a gate electrode placed within a trench extending from the front surface of the semiconductor substrate to the IGBT drift layer and insulated from the semiconductor substrate and the front surface electrode by an insulating film; and an emitter layer of the second conductivity type, the emitter layer being partially provided between the body layer and the front surface electrode, the emitter layer being in contact with the insulating film of the gate electrode and the front surface electrode. The diode region includes: a cathode layer of the second conductivity type, the cathode layer being in contact with the back surface electrode; a diode drift layer of the second conductivity type, the diode drift layer being provided on the front surface side of the semiconductor substrate with respect to the cathode layer, the diode drift layer being lower in impurity concentration than the cathode layer; an anode layer of the first conductivity type, the anode layer being provided on the front surface side of the semiconductor substrate with respect to the diode drift layer, the anode layer being in contact with the front surface electrode; a trench electrode placed within a trench extending from the front surface of the semiconductor substrate to the diode drift layer and insulated from the semiconductor substrate by an insulating film; and an anode contact layer of the first conductivity type, the anode contact layer being provided between the anode layer and the front surface electrode, the anode contact layer being higher in impurity concentration than the anode layer. The diode region is divided into unit diode regions by the gate electrode or the trench electrode.